package study01;

public class Java08_Extend {
    public static void main(String[] args) {
//        多态
        Person p = new Person();
        Person p1 = new Boy();

        p.testPerson("p");
        p1.testPerson("p1");

        Boy b = new Boy();
        b.testBoy();
    }
}

class Person {
    void testPerson(String userName) {
        System.out.println(userName + "test person...");
    }
}

class Boy extends Person {
    public void testBoy() {
        System.out.println("test boy...");
    }
}
